This invention relates to a technology of copying data stored in a plurality of areas on one logical disk to another logical disk. More particularly, this invention relates to a technology which allows a plurality of generations to be retained in a logical disk efficiently, and allows the data to be copied quickly into another medium.
Conventionally, as a data copying technique in a logical disk such as a RAID apparatus, there exist
(1) a separate dual volume technique,
(2) a log structured file technique,
(3) a concurrent copy technique, and
(4) Japanese Patent Application No. 11-279678 applied on Sep. 30, 1999 by Fujitsu Ltd.
In case of the separate dual volume technique, when the RAID apparatus accepts a copy instruction from a host, a copy destination volume (logical disk) is prepared, and when the RAID apparatus accepts a duplication starting instruction from the host, copying from a copy source logical disk to a copy destination logical disk is started so that duplication is executed. Further, the RAID apparatus accepts a separate instruction from the host, it separates both the logical disks so that the copy source logical disk and the copy destination logical disk can be used from separate hosts.
In the log structured file technique, actual data are not copied but data in appearance are copied by pointer setting. For example, when data blocks of logical disks A, B and C are stored in one physical disk, the respective logical disks A, B and C are defined by a pointer of data in the physical disk and at the time of copying from the logical disk A to the logical disk B, a pointer of the logical disk A is set as a pointer of the logical disk B.
In the concurrent copy technique, when copying from a copy source logical disk to a copy destination logical disk is executed, a host reads data from the copy source disk and writes the data into the copy destination disk by a data transfer function. At this time, a bit map of a corresponding address of the copied data is set as xe2x80x9ccopiedxe2x80x9d.
In Japanese Patent Application No. 11-279678, even during data copying, a copy destination logical disk can be accessed. More concretely, a response of copy completion is returned immediately according to a copy instruction, and an access is accepted while actual data are being copied, and copy source and copy destination logical disks are accessed to be referred to and be updated.
However, in case of the separate dual volume technique, a duplication creating instruction should be given before the copy instruction, and a dual state should be completed. Moreover, when a plurality of generations are retained, unchanged areas between the generations are copied in an overlapped state. For this reason, there arises a problem that space efficiency is low.
Furthermore, in case of the log structured file technique, the space efficiency is the highest at the time of retaining a plurality of generations. On the contrary, since areas which were not changed in the copy source and copy destination logical disks are used in common physically, when a disk damage occurs in the commonly used areas, the copy destination logical disk cannot be accessed. For this reason, there arises a problem that a data integrity level is low (safety is low).
Furthermore, in case of the concurrent copy technique, there arises a problem that a copy destination logical disk cannot be accessed during copying process. Moreover, when a plurality of generations are retained, areas which were not changed between the generations are retained in an overlapped state. For this reason, there arises a problem that the space efficiency is low.
The invention of Japanese Patent Application No. 11-279678 solves the problem of the separate dual volume technique that pre-process is required before the copy instruction and the problem of the concurrent copy technique that a copy destination logical disk cannot be accessed during the copying process. However, when a plurality of generations are retained, areas which were not changed between the generations are retained in an overlapped state, and thus there arises a problem that the space efficiency is low.
Particularly when data retained in a logical disk are copied and retained in another external medium in order to heighten safety, copy time is required in proportion to data amount. For this reason, if areas which were not changed between the generations are copied in the overlapped state, not only the space efficiency becomes low but also enormous copy time is required.
Accordingly, the extremely important problems are how to prevent the lowering of the space efficiency in the case of retaining a plurality of generations in a logical disk and how to shorten the enormous copy time required at the time of copying and retaining into another medium.
It is an object of the present invention to provide a method and apparatus which allow a plurality of generations to be retained in a logical disk efficiently, and also allows the data to be copied quickly into another medium. It is an another object of the present invention to provide a computer-readable recording medium which stores a computer program which, when executed on a computer, realizes the method according to the present invention.
The inter-logical disk copy processing apparatus according to one aspect of the present invention comprises an aggregation copying unit which aggregately copies differential data stored in a plurality of areas discretely existing on the copy source logical disk to a continuous area on the copy destination logical disk; and an access processing unit which, when a request to access to the copy source logical disk or copy destination logical disk is generated during the aggregation copying process by the aggregation copying unit, stopping the aggregation copying process by the aggregation copying unit and executing an accessing process.
According to the above-mentioned aspect of this invention, the differential data stored in the plurality of areas discretely existing on the copy source logical disk are aggregately copied to the continuous area on the copy destination logical disk, and when the request to access to the copy source logical disk or copy destination logical disk is generated during the aggregation copying process, the aggregation copy process is stopped and the accessing process is executed. For this reason, a plurality of generations can be retained efficiently in a logical disk, and data can be copied to be retained quickly to another external medium.
The aggregation copying unit may be constituted so as to select a plurality of areas on the copy source logical disk to be copy target based on update history information showing updating histories of the copy source logical disk and forcible copy position information showing that forcible copying is instructed from an external apparatus.
According to this structure, a plurality of areas on the copy source logical disk to be copy target are selected based on the update history information showing updating histories of the copy source logical disk and the forcible copy position information showing that forcible copying is instructed from an external apparatus. For this reason, the areas specified externally can be included in the copy targets.
Furthermore, the aggregation copying unit may be constituted so as to calculate logical OR of the update history information in which the area positions of the copy source logical disk have one to one correspondence to bit positions and forcible copy position information so as to create copy target information, and manages areas to be copied based on the created copy target information.
According to this structure, logical OR of the update history information in which the area positions of the copy source logical disk have one to one correspondence to bit positions and the forcible copy position information is calculated so that the copy target information is created, and areas to be copied are managed based on the created copy target information are managed. For this reason, areas to be copied can be managed efficiently.
The inter-disk copy processing apparatus may be constituted so as to further include a diffusion copying unit (corresponding to a copy processing section of FIG. 1) which diffusely copies the differential data, which were aggregately copied to the continuous area on the copy destination logical disk, to original positions of the copy source logical disk.
According to this structure, the differential data aggregately copied to the continuous area on the copy destination logical disk are diffusely copied to the original positions of the copy source logical disk. For this reason, the differential data which were saved on the copy destination logical disk can be restored efficiently in the copy source logical disk.
The diffusion copying unit may be constituted so as to determine copy areas to be copy targets based on position information of the copy source logical disk and forcible non-copy position information showing areas to be excluded from the copy targets instructed from an external apparatus.
According to this structure, copy areas to be copy targets are determined based on the position information of the copy source logical disk and the forcible non-copy position information showing areas to be excluded from the copy targets instructed from an external apparatus. For this reason, a part of the differential data to be restored can be excluded.
Furthermore, the access processing unit may be constituted so as to update an access target area of the copy destination logical disk when copy non-complete areas of the copy destination logical disk are accessed to be updated.
According to this structure, when copy non-complete areas of the copy destination logical disk are accessed to be updated, access target areas of the copy destination logical disk are updated. For this reason, even if the copying is not completed, the copy destination logical disk can be accessed.
Furthermore, the access processing unit may be constituted so as to forbid updating access to the copy destination logical disk during the aggregation copying process by the aggregation copying unit.
According to this structure, since the updating access to the copy destination logical disk is forbidden during the aggregation copying process, the aggregation copying process can be executed quickly.
Other objects and features of this invention will become apparent from the following description with reference to the accompanying drawings.